# 查看生成器的 执行过程

def feibonaqi(nums):
    print("--------1----------")
    a, b = 0, 1
    current = 0
    while current < nums:
        print("--------2----------")
        ret = a
        # print(ret)
        yield ret
        print("--------3----------")
        a, b = b, a+b
        current +=1
        print("--------4----------")


obj = feibonaqi(10)

obj1 = next(obj)
print(obj1)    
obj2 = next(obj)
print(obj2)





